package cn.stylefeng.guns.modular.gridsystem.model.param;

import cn.stylefeng.guns.core.pojo.base.param.BaseParam;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 采集端故障上报请求封闭类
 *
 * @author zxw 2022/12/17 15:24
 */
@Data
public class CollectionFaultParam extends BaseParam {

    /**
     * 网关编码
     */
    @NotEmpty(message = "网关编码不能务空", groups = {reportFault.class})
    @Size(max = 100, message = "网关编码不能超过最大长度100", groups = {reportFault.class})
    private String gatewayCode;

    /**
     * 故障编码
     */
    @NotNull(message = "故障编码不能为空", groups = {reportFault.class})
    private Integer faultCode;

    /**
     * 故障参数
     */
    @Size(max = 500, message = "故障参数不能超过最大长度500", groups = {reportFault.class})
    private String faultParam;

    /**
     * 参数校验分组：上报故障
     */
    public @interface reportFault {
    }


}
